<?php
function nome($nome){
    $nome = addslashes($nome);
    if(strstr($nome,"/") || strstr($nome,"@") || strstr($nome,"-") || strstr($nome,"_") || strstr($nome,"+") || strstr($nome,"=") || strstr($nome,"!") || strstr($nome,"#") || strstr($nome,"$") || strstr($nome,"%") || strstr($nome,"&") || strstr($nome,"*") || strstr($nome,"?") || strstr($nome,"|") || strstr($nome,":") || strstr($nome,";") || strstr($nome,"{") || strstr($nome,"}") || strstr($nome,"[") || strstr($nome,"]")){
        return 0;
    }else{
        $cnt = 0; $num = 0;
        while($cnt <= strlen($nome)){
            if(ord(substr($nome,$cnt,1)) >= 48 && ord(substr($nome,$cnt,1)) <= 58){ $num++; }
            $cnt++;
        }
        if($num > 0){return 0;}else{return 1;}
    }
}
function email($email){
    $email = addslashes($email);
    if ((strlen($email) >= 6) && (substr_count($email,"@") == 1) && (substr($email,0,1) != "@") && (substr($email,strlen($email)-1,1) != "@") && (!strstr($email,"'")) && (!strstr($email,"\"")) && (!strstr($email,"\\")) && (!strstr($email,"\$")) && (!strstr($email," "))){
        $x = 0;
        while(substr($email,$x,1) != "@"){$x++;}
        $dom = substr($email,$x+1,strlen($email));
        if((substr($dom,0,1) != ".") && (substr($email,strlen($email)-1,1) != ".") && (substr_count($email,".") > 0)){return 1;}else{return 0;}
    }else{return 0;}
}
